//--------------------------------------------------------------------
#ifndef _dkprogram_h
#define _dkprogram_h
//--------------------------------------------------------------------
// struct _dkprogline is an item for linked list of program lines
struct _dkprogline
{
	uint16_t num;
	char *line;

	struct _dkprogline *next;			// items should be linked in list in order of their line numbers
};

//--------------------------------------------------------------------


extern uint16_t dkrunprogram( void );	// run program, starting line is global dkPC (0 for first line)

// dksetprogline - set line for linenum num - add line if it doesn't exist
extern struct _dkprogline *dksetprogline( uint16_t num, char *line );
// dkgetclosestprogline - return pointer to the line number closest to, but lower than, num
extern struct _dkprogline *dkgetclosestprogline( uint16_t num );
extern int dkloadprogram( char *filename );
extern void dknewprogram( void );
extern void dkclearprogram( void );


extern struct _dkprogline *dkprogram;

extern uint16_t dkPC;					// program counter
extern uint16_t dkprevPC;				// previous line program counter

extern uint8_t dkstatus;				// status - holds error codes / goto/gosub indicators

extern uint8_t dktrace;					// trace (tron/troff)

//--------------------------------------------------------------------
#endif	// !_dkprogram_h
//--------------------------------------------------------------------

